package com.yunsc.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yunsc.product.entity.YunscGoodsCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商品分类表
 * 
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-05 01:37:50
 */
@Mapper
public interface YunscGoodsCategoryDao extends BaseMapper<YunscGoodsCategoryEntity> {

    /**
     * 查询所有子分类ID
     * @return
     */
    @Select("select category_id from yunsc_category where parent_id = #{categoryId}")
    List<Integer> selectChildCategoryIds(@Param("categoryId") Integer categoryId);


}
